<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <link rel="icon" href="images/icon.png">
  <link rel="stylesheet" href="css/dropdown.css">
  <title data-sw-translate id="titile">bookerbug's home</title>
  <script>
    var Browser_Agent = navigator.userAgent;
    // 浏览器为IE的情况 
    if (Browser_Agent.indexOf(" MSIE ") != - 1) {
      var a = navigator.browserLanguage;
      cur_language = a;

      console.log(cur_language);
    }
    // 浏览器非IE的情况 
    else {
      var b = navigator.language;
      console.log(b);
      if (b == "zh-CN") {
        cur_language = "zh";
        window.SwaggerTranslator.translate();
      }
    }
  </script>
</head>
<script>
  var cur_language = "en";
  function on_change_language_click() {
      window.SwaggerTranslator.translate();
      if (cur_language == "zh") {
          location.reload(false);
          cur_language = "en"
      } else {
          cur_language = "zh"
      }
  }
  function on_about_me_click() {
    var cur_page_show = document.getElementById("cur_page_show");
    if (cur_language == "zh") {
      cur_page_show.src = "htmlfiles/aboutme/index_cn.html";
    } else {
      cur_page_show.src = "htmlfiles/aboutme/index.html";
    }
  }
  function on_photos_click() {
    var cur_page_show = document.getElementById("cur_page_show");
    cur_page_show.src = "htmlfiles/photos.html";
  }
  function on_icon_click() {
    var cur_page_show = document.getElementById("cur_page_show");
    cur_page_show.src = "htmlfiles/homepage/index.html";
  }
</script>
<script src="./jquery.min.js"></script>
<script src="./zh-cn.bilingualism.js"></script>

<body>
  <ul>
    <li class="head"><a onclick="on_icon_click()">
        <img src="images/icon.png" alt="布客虫的博客" width="64" height="64">
      </a></li>
    <li class="tag">
      <a href="#" data-sw-translate>Blogs</a>
      <ul class="dropdown">
        <li><a target="_blank" href="https://www.cnblogs.com/bookerbug/" data-sw-translate>CnBlogs</a></li>
        <li><a target="_blank" href="https://space.bilibili.com/1807678696/article" data-sw-translate>Bilibili</a></li>
        <li><a target="_blank" href="https://www.zhihu.com/people/89-48-61-67" data-sw-translate>Zhihu</a></li>
      </ul>
    </li>
    <li class="tag"><a href="https://space.bilibili.com/1807678696/video" target="_blank" data-sw-translate>Videos</a>
    </li>
    <li class="tag"><a href="#" onclick="on_photos_click()" target="_self" data-sw-translate>Photos</a></li>
    <li class="tag"><a href="#" onclick="on_about_me_click()" data-sw-translate>About Me</a></li>
    <li class="tag"><a onclick="on_change_language_click()" data-sw-translate>简体中文</a></li>
  </ul>
  <iframe loading="lazy" src="htmlfiles/homepage/index.html" width="100%" height="1000px" id="cur_page_show"></iframe>
  <script type="text/javascript" src="javascripts/language.js"></script>
</body>

</html>
